package member

import (
	"stormragetech/dawn/common"
	"stormragetech/dawn/data"
	"time"
)

// SetToken 缓存token到redis
func SetToken(uid string) (string, error) {
	token := common.UUID()
	err := data.Client.Set(token, uid, 30*60*time.Second).Err()
	if err != nil {
		panic(err)
	}
	return token, nil
}
